package com.cn.wangxin.worker;

import com.cn.wangxin.MyRatelimiter;

import javax.annotation.Resource;

/**
 * 功能描述 TODO
 *
 * @Created Time 2016/10/25
 * @Edited Time 2016/10/25
 * @Created by wangxin43
 */
public class TestWorker {
    @Resource
    private MyRatelimiter myRatelimiter;
    public void handleOrder(){
        for (int i =0;i<10;i++){
            System.out.println(myRatelimiter.getRateLimiter().acquire());
        }
    }
}
